<template>
  <div class="topHistory">
    <div class="text1">⏰</div>
    <div class="text2">
      <div class="text2uptext" @click="$emit('search-value',history.texts)">
        {{ history.texts }}
      </div>
      <div @click="deleHistory" class="text3">×</div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    history: Object,
  },
  methods: {
    deleHistory() {
      this.$emit("dele-history",this.history.id,this.history.texts);
    },
    searchValue(){
      this.$emit("search-value",this.history.id,this.history.texts);
    }
  },
};
</script>

<style lang="scss" scoped>
.topHistory {
  width: 375rem;
  display: flex;
  height: 45rem;
  line-height: 45rem;
  .text1 {
    width: 35rem;
    text-align: center;
    font-size: 14rem;
  }
  .text2 {
    width: 340rem;
    display: flex;
    color: #333;
    justify-content: space-between;
    padding-left: 5rem;
    .text2uptext{
      font-size: 14rem;
    }
  }
  .text3 {
    color: #ccc9c9;
    margin-right: 25rem;
    font-size: 30rem;
  }
}
</style>